package com.zsl.swing.redis.desktop.window.list;

import java.util.Objects;

public class ZslListNode {

    private String redisKey;

    private String redisVal;

    private String cursor;

    private int scanCount;

    public int getScanCount() {
        return scanCount;
    }

    public void setScanCount(int scanCount) {
        this.scanCount = scanCount;
    }

    public String getRedisKey() {
        return redisKey;
    }

    public void setRedisKey(String redisKey) {
        this.redisKey = redisKey;
    }

    public String getRedisVal() {
        return redisVal;
    }

    public void setRedisVal(String redisVal) {
        this.redisVal = redisVal;
    }

    public String getCursor() {
        return cursor;
    }

    public void setCursor(String cursor) {
        this.cursor = cursor;
    }

    @Override
    public String toString() {
        return this.redisKey;
    }

    @Override
    public boolean equals(Object obj) {
        if(Objects.isNull(obj)){
            return false;
        }

        if(! (obj instanceof ZslListNode)){
            return false;
        }

        ZslListNode other = (ZslListNode) obj;
        return this.redisKey.equals(other.redisKey);
    }
}
